package com.fh.common;/**
 * 描述:
 * Author:袁亚强
 * Date:2021/10/1718:47
 */

/**
 * created by macro on 2021/10/17,
 */
public class yyqData {
    private Integer code;
    private String msg;
    private Object data;


    public static yyqData success(Object data){
        yyqData yyqData=new yyqData();
        yyqData.setMsg("处理成功");
        yyqData.setCode(200);
        yyqData.setData(data);
        return yyqData;
    }

    public static yyqData error(Integer code,String msg){
        yyqData yyqData=new yyqData();
        yyqData.setMsg("错误信息:"+msg);
        yyqData.setData(null);
        yyqData.setCode(code);

        return yyqData;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
